﻿using System;
using OneMG.Phoenix.Entity;
using OneMG.Phoenix.Respository;
using IBatisNet.DataMapper;
using OneMG.Phoenix.Kernel.IBatisUtil;

namespace OneMG.Phoenix.IBatisRepository
{
    public class AdminGroupRepository : BaseIBatisDao,IAdminGroup
    {
        public AdminGroupRepository()
            : base("yihaoke_newMap.Config")
        {

        }
        public System.Int32 AddAdminGroup(EAdminGroup entity)
        {
			string stmtId = "AdminGroupMap.InsertAdminGroup";
			 Object obj = base.SqlMapper.Insert(stmtId, entity);
			 return (System.Int32)obj;
        }
        
		public  EAdminGroup GetByGroupID (System.Int32 groupID)
        {
			string stmtId = "AdminGroupMap.SelectByGroupID";
			return base.SqlMapper.QueryForObject<EAdminGroup>(stmtId, groupID);
        }
        
        public  void DeleteByGroupID (System.Int32 groupID)
        {
			string stmtId = "AdminGroupMap.DeleteByGroupID";
			base.SqlMapper.Update(stmtId, groupID);
        }
        
        public  void UpdateByGroupID (EAdminGroup entity)
        {
			string stmtId = "AdminGroupMap.UpdateByGroupID";
			base.SqlMapper.Update(stmtId, entity);
        }

    }
}

